home *** CD-ROM | disk | FTP | other *** search
- Path: sierra.net!usenet
- From: T Colwell <snowbull@sierra.net>
- Newsgroups: comp.lang.c++
- Subject: Re: Using multiple functions in one file
- Date: Thu, 11 Jan 1996 09:00:22 -0800
- Organization: Sierra-Net
- Message-ID: <30F54226.31EA@sierra.net>
- References: <DL00rI.HFr@cunews.carleton.ca>
- NNTP-Posting-Host: 204.94.232.59
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (WinNT; I)
-
- Andrew Belo wrote:
- >
- > I have written an example program out of a book and it keeps giving me an
- > error that says "Call to undefined function 'butler' in function main()"
- > I am using Borland C++ for Dos, Win and Win 32 Version 4.5.
- >
- > The book is called C: Step by Step, and the program is as follows.
- >
- > /* two_func.c -- a program using two functions in one file */
- > #include <stdio.h>
- > main()
- > {
- > printf("I will summon the butler function. \n");
- > butler();
- > printf("Yes. Bring me some tea and floppy disks.\n");
- > }
- > butler()
- > {
- > printf("You rang, sir? \n");
- > }
- >
- > Thanx
- >
- > ----------------------------------------------------------------
- ------------
- > Andrew Belo | WARNING: Yes this message has spelling mistakes but
- > 1st Year Computer Sci | learn to live with it!!!!!!!!
- > Carleton University ------------------------------------------------------
- > Email address: abelo@chat.carleton.ca
- > ai806@FreeNet.Carleton.CA
- > Home Page: chat.carleton.ca/~abelo
- > ----------------------------------------------------------------
- ------
- Try placing butler() before main() and recompiling.
-